<!--
 * @LastEditors: 杜康
 * @LastEditTime: 2022-02-07 11:30:18
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <!-- 网页头增加只相信自己资源的标签，方式XSS注入攻击 -->
  <meta http-equiv="Content-Security-Policy"
    content="default-src 'self'; script-src 'self' 'unsafe-inline'; connect-src *">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>BookMarker</title>
  <link rel="stylesheet" href="style.css" type="text/css">
</head>

<body>
  <h1>Hello from Electron</h1>
  <div class="error-message"></div>
  <section class="add-new-link">
    <form class="new-link-form">
      <input type="url" class="new-link-url" placeholder="URL" size="100" required>
      <input type="submit" class="new-link-submit" value="Submit" disabled>
    </form>
  </section>
  <section class="links"></section>
  <section class="controls">
    <button class="clear-storage">Clear Storage</button>
  </section>
  <script src="./renderer.js">
    // require('./renderer.js')
    // const linkSection = document.querySelector('.links')
    // const errorMessage = document.querySelector('.error-message')
    // const newLinkForm = document.querySelector('.new-link-form')
    // const newLinkUrl = document.querySelector('.new-link-url')
    // const newLinkSubmit = document.querySelector('.new-link-submit')
    // const clearStorageButton = document.querySelector('.clear-storage')

    // newLinkUrl.addEventListener('keyup', () => {
    //   newLinkSubmit.disabled = !newLinkUrl.validity.valid
    //   console.log('🚀 ~ newLinkUrl.addEventListener ~ newLinkUrl.validity.valid', newLinkUrl.validity.valid)
    // })
  </script>
</body>

</html>